{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# A software bug\n", "## Problem Definition\n", "You are using a legacy software to solve a production mix Continuous Linear Programming (CLP) problem in your company where the objective is to maximise profits. The following table provides the solution of the primal, dual and a sensitivity analysis for the three decision variables that represent the quantities to produce of each product\n", "\n", "| Variables | Solution | Reduced cost | Objective Coefficient | Lower bound | Upper bound |\n", "|-----------|----------|--------------|-----------------------|-------------|-------------|\n", "| $x_1$ | 300.00 | ? | 30.00 | 24.44 | Inf |\n", "| $x_2$ | 33.33 | ? | 20.00 | -0.00 | 90.00 |\n", "| $x_3$ | 0 | -8.33 | 40.00 | -Inf | 48.33 |\n", "\n", "Answer the following questions: \n", "\n", "**a.** Notice that there are some values missing (a bug in the software shows a ? sign instead of a numerical value, remember to use Python the next time around). Fill the missing values and explain your decision\n", "\n", "The reduced costs of $x_1$ and $x_2$ must be zero, since the two variables are basic, the reduced cost is zero.\n", "\n", "**b.** According to the provided solution, which of the three products has the highest impact in your objective function? Motivate your response\n", "\n", "The product of the objective coefficient times the solution determines the impact in the objective function. In this case, the variable that has the highest impact in the objective function is $x_1$\n", "\n", "**c.** What does the model tell you about product $x_3$? Is it profitable to manufacture under the current conditions modeled in the problem? Provide quantitative values to motivate your response\n", "\n", "In this solution, it is not profitable to manufacture $x_3$. In fact, manufacturing 1 unit would have a negative impact of 8.33 in the objective function.\n", "\n", "**d.** Recall that in this type of problem, the objective coefficient represents the marginal profit per unit of product. What would happen if the objective function of variable $x_3$ is increased over 50? Describe what would be the impact in the obtained solution\n", "\n", "The upper bound of the objective coefficient is 48.33, meaning that if the objective coefficient goes over this value, we would experience a change in the FSB. Most likely, variable The objective coefficient would need to increase up to 48.33 to make this product profitable $x_3$ would enter the solution.\n", "\n", "\n", "The following table represents the value obtained for the decision variables related to the constraints: \n", "\n", "| Constraint | Right Hand Side | Shadow Price | Slack | Min RHS | Max RHS |\n", "|------------|-----------------|--------------|--------|---------|---------|\n", "| $s_1$ | 400.00 | 6.67 | 0.00 | 300.00 | 525.00 |\n", "| $s_2$ | 600.00 | 11.67 | 0.00 | 0.00 | 800.00 |\n", "| $s_3$ | 600.00 | 0.00 | 166.67 | 433.33 | Inf |\n", "\n", "Bearing in mind that the constraints represent the availability of 3 limited resources (operating time in minutes) and that the type of constraints is in every case \"less or equal\" answer the following questions: \n", "\n", "**e.** Which decision variables are basic? How many are there and, is this result expected? Motivate your response\n", "\n", "The basic decision variables are $x_1$, $x_2$, and $s_3$, as many basic decision variables as constraints, since this is a Feasible Basic Solution (FBS). \n", "\n", "**f.** Imagine that you had to cut down costs by reducing the availability of the limited resources in the model. Which one would you select? How much could you cut down without changing the production mix? Motivate your response\n", "\n", "If the Right Hand Sides represent availability of resources, we could reduce the availability of the third constraint in 166.7 units (slack) without any change in the base. \n", "\n", "**g.** Now, with the money saved, you could invest to increase the availability of other limited resources. Again, indicate which one would you select and by how much you would increase the availability of this resource without changing the production mix. Motivate your response\n", "\n", "The best option is to invest in the resource of the second constraint, since it has the largest shadow price. The RHS can increase up to 800 units without a change in the base. \n", "\n", "**h.** How do the columns of the two tables relate to the primal and dual problem? Moreover, for each column, not considering upper and lower bounds, write down a brief description of each column and the relationship it has with the primal and dual problem\n", "\n", "In the first table, the column solution contains the values of the decision variables of the primal and the column reduced costs represents the slack variables of the dual. \n", "In the second table, the column slack represents the values of the slack variables in the primal solution and the column shadow prices, represent the values of the decision variables of the dual." ] }, { "cell_type": "markdown", "metadata": {}, "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" }, "pycharm": { "stem_cell": { "cell_type": "raw", "source": [], "metadata": { "collapsed": false } } } }, "nbformat": 4, "nbformat_minor": 2 }